package com.xuerhua.yxt.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.xuerhua.yxt.model.KccsCourseInfo;
import com.xuerhua.yxt.page.Page;
import com.xuerhua.yxt.reqVo.BaseQueryVO;
import com.xuerhua.yxt.reqVo.KccsCourseQueryVO;
import com.xuerhua.yxt.view.KccsCourseView;

public interface KccsCourseInfoMapper {

	int insertReplace(KccsCourseInfo record);
	
    int insertSelective(KccsCourseInfo record);

    KccsCourseInfo selectByPrimaryKey(Integer id);

    /**
     * @author hhk
     */
    KccsCourseInfo selectViewById(KccsCourseQueryVO vo);
    
    List<KccsCourseInfo> selectList(KccsCourseQueryVO vo);
    
    List<KccsCourseInfo> selectListByPage(Page<KccsCourseInfo> page);

    int updateByPrimaryKeySelective(KccsCourseInfo record);
  //查询待审核的课程
    List<KccsCourseInfo> selectPendingList(Page<KccsCourseInfo> page);
    //查询已审核的课程
    List<KccsCourseInfo> selectApprovedList(Page<KccsCourseInfo> page);
    //查询我创建的课程
    List<KccsCourseInfo> selectMyCreateList(Integer teacherId);
    //查询任课的课程列表
    List<KccsCourseInfo> selectListForTeaching(@Param("teacherId")Integer teacherId, @Param("schoolId")Integer schoolId);
    //查看可报名的课程详情
    KccsCourseView selectSignCourseDetail(BaseQueryVO vo);
    //查看可报名的课程列表
    List<KccsCourseView> selectSignCourseList(KccsCourseQueryVO vo);
    //查询课程报名人数是否已过
    int selectCourseSignLimit(KccsCourseQueryVO vo);
    int delKccsCourse(List<String> list);
    //修改课程状态
    int updateBatchCourseStatus(@Param("list")List<String> list, 
    		@Param("isAgree")Integer isAgree, 
    		@Param("updaterId")Integer updaterId, 
    		@Param("updater")String updater,
            @Param("schoolId")Integer schoolId);
}